<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 定义类
    class Person {
      // 实现构造函数里面定义属性
      constructor (theName, theAge) {
        this.name = theName;
        this.age = theAge;
      }
      // 定义方法
      sayHello () {
        console.log('你好啊,我是顿健康');
      }
    }
    // 实例化对象
    var per = new Person()
    console.log(per);
  </script>
</body>
</html>